package eerbaar.v2.app.tasks;

import java.awt.Graphics2D;

import eerbaar.v2.app.core.MainWindow;
import eerbaar.v2.app.view.IView;

public class DisplayViewTask implements IGameTask {

    private final IView view;

    public DisplayViewTask(IView view, MainWindow window) {
        this.view = view;
    }

    @Override
    public void doTask(Graphics2D g) {

        this.view.draw(g);
    }

    @Override
    public Priority getPriority() {
        return Priority.LAST;
    }

    @Override
    public int getRate() {
        return 1;
    }

    @Override
    public boolean runWhenSuspended() {
        return true;
    }

}
